#pragma once
#define FUCTIONTYPE __stdcall


#define DEELX_NO_FLAG			0
#define DEELX_SINGLELINE		0x01
#define DEELX_MULTILINE			0x02
#define DEELX_GLOBAL			0x04
#define DEELX_IGNORECASE		0x08
#define DEELX_RIGHTTOLEFT		0x10
#define DEELX_EXTENDED			0x20



void* FUCTIONTYPE DeelxTool_Create();
void* FUCTIONTYPE DeelxTool_Match(void* hDeelx, LPCTSTR lpszSrc, LPCTSTR lpszRex, int nFlag = DEELX_NO_FLAG);
void FUCTIONTYPE DeelxTool_Destory(void* hDeelx);
BOOL FUCTIONTYPE DeelxTool_IsMatch(void* hDeelx);
VOID FUCTIONTYPE DeelxTool_MatchNext(void* hDeelx);
INT FUCTIONTYPE DeelxTool_GetMatchIndex(void* hDeelx);
INT FUCTIONTYPE DeelxTool_GetGroupCount(void* hDeelx);
LPCTSTR FUCTIONTYPE DeelxTool_GetMatchText(void* hDeelx);
LPCTSTR FUCTIONTYPE DeelxTool_GetGrounpText(void* hDeelx, int nGroupNumber);
LPCTSTR FUCTIONTYPE DeelxTool_GetGroupNameText(void* hDeelx, LPCTSTR lpszGroupName);
LPTSTR FUCTIONTYPE DeelxTool_ReplaceBegin(LPCTSTR lpSrcText, LPCTSTR lpRegexString, LPCTSTR lpText, int nStart, int nReplaceCount, int nFlag);
void FUCTIONTYPE DeelxTool_ReplaceEnd(LPTSTR pTempString);